package com.ildepinc.persistence.abstracts;

import java.sql.Timestamp;

import com.ildepinc.persistence.interfaces.TableAuditableBehaviour;

public abstract class TableAuditable extends TableGeneric implements TableAuditableBehaviour {
  private Timestamp insertedAt;
  private String insertedBy;
  private Timestamp updatedAt;
  private String updatedBy;

  @Override
  public Timestamp getInsertedAt() {
    return this.insertedAt;
  }

  @Override
  public String getInsertedBy() {
    return this.insertedBy;
  }

  @Override
  public Timestamp getUpdatedAt() {
    return this.updatedAt;
  }

  @Override
  public String getUpdatedBy() {
    return this.updatedBy;
  }

  @Override
  public void setInsertedAt(Timestamp insertedAt) {
    this.insertedAt = insertedAt;
  }

  @Override
  public void setInsertedBy(String insertedBy) {
    this.insertedBy = insertedBy;
  }

  @Override
  public void setUpdatedAt(Timestamp updatedAt) {
    this.updatedAt = updatedAt;
  }

  @Override
  public void setUpdatedBy(String updatedBy) {
    this.updatedBy = updatedBy;
  }

  @Override
  public void clear() {
    super.clear();
    this.insertedAt = null;
    this.insertedBy = null;
    this.updatedAt = null;
    this.updatedBy = null;
  }
}
